package com.quectel.core.module.device.dto.mongo;

import com.quectel.core.module.device.dto.DeviceCommandTemplateDto;
import com.quectel.core.module.device.dto.DeviceDto;
import lombok.*;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * 说明:
 *
 * @author: rananxin
 * @email: ryan.ran@quectel.com
 * @date: 2021/11/4 3:04 下午
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MongoDeviceCommandLogDto implements Serializable {

    private Long id;


    private Map<String, Object> sendOriginalMsg;

    private String sendParsedMsg;

    private Date sendTime;

    private Byte sendStatus;

    private String receiveOriginalMsg;

    private Map<String, Object> receiveParsedMsg;

    private Date receiveTime;

    private Byte receiveStatus;

    /**
     * 操作员类型 1是管理员 2是业主
     */
    private Byte operatorType;

    private Long operatorId;


    /************非数据库字段 传参或者回显 start ************/

    private DeviceDto deviceDto;

    private DeviceCommandTemplateDto deviceCommandTemplateDto;

    /************非数据库字段 传参或者回显 end ************/

    @AllArgsConstructor
    public enum OperatorTypeEnum {
        ADMIN((byte) 1),
        HOUSEHOLD((byte) 2);
        @Getter
        @Setter
        private Byte operatorType;
    }

}
